package com.ruoyi.recipes.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.recipes.mapper.DifficultyOptionsMapper;
import com.ruoyi.recipes.domain.DifficultyOptions;
import com.ruoyi.recipes.service.IDifficultyOptionsService;

import javax.annotation.Resource;

/**
 * 难度选项Service业务层处理
 * 
 * @author syy
 * @date 2025-08-12
 */
@Service
public class DifficultyOptionsServiceImpl implements IDifficultyOptionsService 
{
    @Resource
    private DifficultyOptionsMapper difficultyOptionsMapper;

    /**
     * 查询难度选项
     * 
     * @param id 难度选项主键
     * @return 难度选项
     */
    @Override
    public DifficultyOptions selectDifficultyOptionsById(Long id)
    {
        return difficultyOptionsMapper.selectDifficultyOptionsById(id);
    }

    /**
     * 查询难度选项列表
     * 
     * @param difficultyOptions 难度选项
     * @return 难度选项
     */
    @Override
    public List<DifficultyOptions> selectDifficultyOptionsList(DifficultyOptions difficultyOptions)
    {
        return difficultyOptionsMapper.selectDifficultyOptionsList(difficultyOptions);
    }

    /**
     * 新增难度选项
     * 
     * @param difficultyOptions 难度选项
     * @return 结果
     */
    @Override
    public int insertDifficultyOptions(DifficultyOptions difficultyOptions)
    {
        return difficultyOptionsMapper.insertDifficultyOptions(difficultyOptions);
    }

    /**
     * 修改难度选项
     * 
     * @param difficultyOptions 难度选项
     * @return 结果
     */
    @Override
    public int updateDifficultyOptions(DifficultyOptions difficultyOptions)
    {
        return difficultyOptionsMapper.updateDifficultyOptions(difficultyOptions);
    }

    /**
     * 批量删除难度选项
     * 
     * @param ids 需要删除的难度选项主键
     * @return 结果
     */
    @Override
    public int deleteDifficultyOptionsByIds(Long[] ids)
    {
        return difficultyOptionsMapper.deleteDifficultyOptionsByIds(ids);
    }

    /**
     * 删除难度选项信息
     * 
     * @param id 难度选项主键
     * @return 结果
     */
    @Override
    public int deleteDifficultyOptionsById(Long id)
    {
        return difficultyOptionsMapper.deleteDifficultyOptionsById(id);
    }
}
